package entity

type Alarm struct {
	Id int64 `gorm:"column:id;type:BIGINT;primary_key" json:"id"`

	UserId int64 `gorm:"column:user_id;type:BIGINT" json:"user_id"`

	Type int64 `gorm:"column:type;type:BIGINT" json:"type"`

	EbikeId int64 `gorm:"column:ebike_id;type:BIGINT" json:"ebike_id"`

	EbikeTypeId int64 `gorm:"column:ebike_type_id;type:BIGINT" json:"ebike_type_id"`

	EbikeTypeName string `gorm:"column:ebike_type_name;type:VARCHAR(255)" json:"ebike_type_name"`

	FrameCode string `gorm:"column:frame_code;type:VARCHAR(255)" json:"frame_code"`

	ControlId int64 `gorm:"column:control_id;type:BIGINT" json:"control_id"`

	Level int `gorm:"column:level;type:TINYINT" json:"level"`

	Score int `gorm:"column:score;type:TINYINT" json:"score"`

	CreatedAt int64 `gorm:"column:created_at;type:BIGINT" json:"created_at"`

	UpdatedAt int64 `gorm:"column:updated_at;type:BIGINT" json:"updated_at"`
}

func (a *Alarm) TableName() string {
	return "alarms"
}
